<template>
    <div>

        <el-form :inline="true" class="demo-form-inline">
            <el-form-item label="客户id">
                <el-input v-model="customId" placeholder="客户id"></el-input>
            </el-form-item>
            <el-form-item label="数量">
                <el-input v-model="num" placeholder="数量"></el-input>
            </el-form-item>
            <el-form-item label="地址">
                <el-input v-model="sendAddress" placeholder="地址"></el-input>
            </el-form-item>
            <el-form-item label="库存商品id">
                <el-input v-model="stockId" placeholder="库存商品id"></el-input>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="add">添加预处理</el-button>
            </el-form-item>
        </el-form>
    </div>
</template>

<script>
    export default {
        name: "ShowAdd",

        data() {
            return {
                customId: '',
                num: '',
                sendAddress: '',
                stockId: '',

            }
        },
        methods: {

            add() {
                let url = "api/sell/addNumber?customId=" + this.customId
                    + "&num="+this.num+"&sendAddress="+this.sendAddress+"&stockId="+this.stockId
                this.$axios.get(url).then(r => {
                    console.log(r.data)
                    if (r.data == true) {
                        alert("完成添加")
                        this.$router.push("RetrievaView")
                    }
                })
            }
        }
    }
</script>

<style scoped>

</style>